package com.wish.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "t_permission")
public class Permission implements Serializable
{

	private static final long serialVersionUID = -5169504841840786233L;

	@Id
	@Column(name = "Permission", length = 50, nullable = false)
	private String permission = "";

	@Column(name = "Name", length = 50, nullable = false)
	private String name = "";

	@Column(name = "Description", length = 255, nullable = false)
	private String description = " ";

	public String getPermission()
	{
		return permission;
	}

	public void setPermission(String permission)
	{
		this.permission = permission;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + ((permission == null) ? 0 : permission.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Permission other = (Permission) obj;
		if (permission == null)
		{
			if (other.permission != null)
				return false;
		}
		else if (!permission.equals(other.permission))
			return false;
		return true;
	}

}
